package com.java.entity;

import com.java.utils.UserSession;

/**
* @ClassName: TodoList
* @Description: 待办实体
*
 */
public class TodoList {
	private int id;
	// 用户ID
	private int userId;
	// 标题
	private String title;
	// 优先级（0优先级最小）
	private String level;
	// 开始时间
	private String startTime;
	// 截止时间
	private String endTime;
	// 创建时间
	private String createTime;

	public TodoList() {
	}

	public TodoList(int id, String title, String level, String startTime, String endTime, String createTime) {
		super();
		this.id = id;
		this.userId = UserSession.getInstance().getUserId();
		this.title = title;
		this.level = level;
		this.startTime = startTime;
		this.endTime = endTime;
		this.createTime = createTime;
	}

	public boolean equals(Object obj) {
		boolean flag = false;
		TodoList todo = (TodoList) obj;
		if (this.title.equals(todo.getTitle()) && this.startTime.equals(todo.getStartTime())
				&& this.endTime.equals(todo.getEndTime())) {
			flag = true;
		}
		return flag;
	}

	@Override
	public String toString() {
		return "TodoList [id=" + id + ", title=" + title + ", level=" + level + ", startTime=" + startTime
				+ ", endTime=" + endTime + ", createTime=" + createTime + "]";
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getLevel() {
		return level;
	}

	public void setLevel(String level) {
		this.level = level;
	}

	public String getStartTime() {
		return startTime;
	}

	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}

	public String getEndTime() {
		return endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

}
